package com.samphanie.security.security.service.impl;

import com.samphanie.security.domain.OauthClient;
import com.samphanie.security.security.service.OauthClientService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.oauth2.common.exceptions.InvalidClientException;
import org.springframework.security.oauth2.provider.NoSuchClientException;

import java.util.Optional;

/**
 * @author Dries
 * @email 1451691457@qq.com
 */
@Slf4j
public class DefaultOauthClientServiceImpl implements OauthClientService {

    /**
     * 查询客户端信息
     *
     * @param clientId 客户端ID
     * @return OauthClient
     */
    @Override
    public Optional<OauthClient> loadClientByClientId(String clientId) {
        log.warn("请配置 IOauthClientService 接口的实现.");
        throw new InvalidClientException("请配置 IOauthClientService 接口的实现.");
    }
}
